Optical multiplex or demultiplex devices based on echelle grating techniques have been used to realize multiplexing or demultiplexing of optical signals. Several approaches may be implemented to increase reflectivity of the grating surface in such devices and accordingly reduce optical loss. In some cases, due to large incidence angles of light received from input waveguides, which are sometimes greater than total internal reflection (TIR) angles (˜26° in a silicon platform), it can be a challenge to design a device that achieves a substantially uniform phase wavefront in the slab region across from the echelle grating. A non-uniform phase wavefront along the echelle grating can result in phase aberrations from the echelle grating surface, resulting in low grating efficiency, excess loss, and reduced figure-of-merit (FOM) of the echelle grating. For an echelle grating based optical multiplexer (Mux) and demultiplexer (Demux), phase aberrations may induce higher device loss, reduced filter passband and unwanted channel crosstalk, especially during Demux.